package de.com.cn.springboot;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


import de.com.cn.springboot.dao.UserMapper;
import de.com.cn.springboot.model.User;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = RelationshipApplication.class)
public class ConnectDataSource {

    @Autowired
    private UserMapper authorDao;

    @Test
    public void testInsert() {
    	User author = new User();
        author.setAccount("2");
        author.setUsername("莫言");
        authorDao.insert(author);
        System.out.println("插入成功！");
    }
}